<template>
  <keep-alive  v-if="router.currentRoute.value.keepAlive">
      <router-view />
  </keep-alive>
  <router-view  v-else />
</template>

<script>
  import { useRouter } from 'vue-router';
  export  default {
      setup() {
          const router = useRouter();
          return {
              router
          }
      }
  }
</script>